<?
$pageName = "enrollment";
include ROOT . '/view/admin/common/header.php';
?>
<?
/**
 * @var	$studentsToDelete
 * @var	Student	$student
 */
?>
	<div class="container">
		<div class="page-header">
			<br /><br />
			<h2>
				<label>学籍管理</label>
			</h2>
		</div>
		<div class="row" style="margin-bottom:30px;">
			<div class="col-xs-12">
				<h3>
					以下学生需要开除学籍 <small>共计<?=count($studentsToDelete)?>个</small>
				</h3>
				<table class="table table-striped">
					<thead>
					<tr>
						<th>学号</th>
						<th>姓名</th>
						<th>所在班级</th>
						<th>所欠学分</th>
						<th>操作</th>
					</tr>
					</thead>
					<tbody>
						<?
							foreach($studentsToDelete as $studentId => $failedCredits) {
								$student = Student::load($studentId);
						?>
						<tr>
							<td><?=$student->studentNo?></td>
							<td><?=$student->name?></td>
							<td><?=$student->studentClass()->name?></td>
							<td><?=$failedCredits?></td>
							<td>
								<a href="/admin/student/delete/<?=$student->id?>/" onclick="return confirm('确认要删除学生“<?=$student->name?>”吗？')">开除</a>
							</td>
						</tr>
					<?}?>
					</tbody>
				</table>
			</div>
		</div>
	</div>
<? include ROOT . '/view/common/footer.php'; ?>